using System;
using System.Collections.Generic;
using System.Text;

using PickGold;
using PickGold.Database;

namespace PickGold.Entities.Table
{
    public class CBaseSaleMode : CBaseTable
    {
        //
        public const string ENTITY_NAME = "tb_sys_sale_mode";
        public const string ENTITY_ALIAS = "sale_mode";
        public const string ENTITY_KEY = "mode_id";
        public const string ENTITY_SYMBOL = "mode_name";
        //
        public const string ITEM_NOTE = "item_note";
        //
		private SBaseSaleMode _ = null;
        //
        public CBaseSaleMode() : base(ENTITY_NAME, ENTITY_ALIAS) { }
        public CBaseSaleMode(CDatabase db) : base(db, ENTITY_NAME, ENTITY_ALIAS) { }
        public CBaseSaleMode(string alias) : base(ENTITY_NAME, alias) { }
		public CBaseSaleMode(CDatabase db, string alias) : base(db, ENTITY_NAME, alias) { }
        //
        protected override void SetSchema()
        {
			this.SetSchema(new SBaseSaleMode());
        }
		protected void SetSchema(SBaseSaleMode s)
        {
            this._ = s;
            base.SetSchema(s);
        }
        //
        protected override void PreInitSchema()
        {
            base.PreInitSchema();
            this._DataTable.Columns.Add(ITEM_NOTE, typeof(string)).MaxLength = 256;
        }
        //
        #region Property
        //
        public string ItemNote
        {
            set
            {
                this._.ItemNote = value;
                this.SetValue(ITEM_NOTE, value);
            }
            get
            {
                return this._.ItemNote;
            }
        }
        //
        #endregion
        //
        public override bool MoveTo(int position)
        {
            if (!base.MoveTo(position))
                return false;
            this._.ItemNote = this.GetValue<string>(ITEM_NOTE);
            return true;
        }
        //
    }
    //
    public class SBaseSaleMode : SBaseTable
    {
        //
        public string ItemNote = null;
        //
    }
    //
}
//
